﻿<navigation:Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:local="clr-namespace:Skybot.Arcgis.Client.TileLayerExpand;assembly=Skybot.Arcgis.Client.TileLayerExpand"
    mc:Ignorable="d" 
        xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client"

    xmlns:ESRI_ArcGIS_Client="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" x:Class="ArcgisStudy.Home" d:DesignWidth="640" d:DesignHeight="480" Title="主页" Style="{StaticResource PageStyle}">

    <Grid x:Name="LayoutRoot"
          
            xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
            xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
          >
<!--
    注意 这个页面需要引用1.0 的 API    
        
        -->
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" d:IsHidden="True" d:IsLocked="True">
            <StackPanel x:Name="ContentStackPanel">
                <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" Text="主页"/>
                <TextBlock x:Name="ContentText" Style="{StaticResource ContentTextStyle}" Text="主页内容"/>
            </StackPanel>
        </ScrollViewer>
        <ESRI_ArcGIS_Client:Map x:Name="MapControl" IsLogoVisible="false"   d:IsHidden="True" d:IsLocked="True">
            <ESRI_ArcGIS_Client:Map.Layers>
                <!--<ESRI_ArcGIS_Client:ArcGISTiledMapServiceLayer Url="http://192.168.58.91/ArcGIS/rest/services/ShangHaiTile/MapServer"></ESRI_ArcGIS_Client:ArcGISTiledMapServiceLayer>-->
                <!--<local:TileLayerBingMapExpand UriTemplate="http://192.168.58.75:90/tiles/r{quadkey}.png?g=49" Opacity="0.75" ></local:TileLayerBingMapExpand>-->
                <ESRI_ArcGIS_Client:GraphicsLayer  ID="gLayer"></ESRI_ArcGIS_Client:GraphicsLayer>
            </ESRI_ArcGIS_Client:Map.Layers>

   
        </ESRI_ArcGIS_Client:Map>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left"  >
            <RadioButton x:Name="Road"            Checked="LayerType_Checked"    GroupName="LayerType" HorizontalAlignment="Left" Content="Road" Margin="0" Foreground="#FF0681FF"/>
            <RadioButton x:Name="AerialWithLabels"  Checked="LayerType_Checked"  GroupName="LayerType" HorizontalAlignment="Right" Content="AerialWithLabels" Margin="0" Foreground="#FF0681FF"/>
            <RadioButton x:Name="Aerial" Margin="0" Checked="LayerType_Checked"   GroupName="LayerType" Content="Aerial" d:LayoutOverrides="Width" Foreground="#FF0681FF"/>
            <Button Width="80" Height="30" Content="添加自定义图" Click="Button_Click"></Button>
            <TextBlock x:Name="tt"></TextBlock>
        </StackPanel>


        <Grid    x:Name="可视化样式定义"   Visibility="Collapsed">
            <Grid.Resources>

                <ControlTemplate TargetType="esriSymbols:TextSymbol" x:Key='TextSymbolStyle' xmlns:esriSymbols='clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client'    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                    <Grid x:Name='RootElement' Margin="0,20,0,0"  RenderTransformOrigin="0,0" >
                        <Grid.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX='1'/>
                                <SkewTransform/>
                                <RotateTransform Angle='45'/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Grid.RenderTransform>
                        <Border x:Name='Border' Opacity='1' Background='#FFE9FFBE'  BorderBrush='Black' CornerRadius='1' BorderThickness='1'>
                            <TextBlock Text='这里写站名' />
                        </Border>
                    </Grid>
                </ControlTemplate>


            </Grid.Resources>
            <TextBlock Height="16" VerticalAlignment="Top">各图标所表示的意思</TextBlock>
            <ListBox>
                <ListBox.Items>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="上行线路颜色" Width="100"/>
                        <Path Stretch="Fill"  x:Name="RouteLineUpSymbolStyle"  Stroke="#FFFBA930" Fill="#FF1ECC12" StrokeThickness="5" Height="5" Width="80"  Data="M120,34 L401.5,34"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="下行线路颜色" Width="100"/>
                        <Path Stretch="Fill"  x:Name="RouteLineDownSymbolStyle"  Stroke="#FF3AC0FF" Fill="#FF1ECC12" StrokeThickness="5" Height="5" Width="80"  Data="M120,34 L401.5,34"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="下行站点图标" Width="100"/>
                        <Image Width="16" Height="16" x:Name="StationDownSiteStyle" Source="/images/浅蓝.png"/>
                    </StackPanel>

                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="上行站点图标" Width="100"/>
                        <Image Width="16" Height="16" x:Name="StationUpSiteStyle" Source="/images/桔红.png"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="一般车辆图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="RouteBusCommonStyle" Source="/images/car-blue-32x32.png"/>
                    </StackPanel>
                    <StackPanel  Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="离线车辆图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="RouteBusOffLineStyle" Source="/images/car-yellow-32x32.png"/>
                    </StackPanel>
                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="异常车辆图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="RouteBusErrorStyle" Source="/images/car-red-32x32.png"/>
                    </StackPanel>

                    <StackPanel Height="34" Orientation="Horizontal"  >
                        <TextBlock Text="驾驭员请求图标" Width="100"/>
                        <Image Width="32" Height="32" x:Name="DriverRequestStyle" Source="/images/flag-cyan-32x32.png"/>
                    </StackPanel>
                </ListBox.Items>
            </ListBox>


        </Grid>
    </Grid>

</navigation:Page>
